<?php
include("../connect/connect_dsccmis.php");
//วันที่ปัจจุบัน
$tempY=date("Y");
if($tempY<"2550"){
	$tempY=(int)$tempY+543;
}
$datetime_now= $tempY.date("-m-d-H:i");
echo "<br>Started Monthly Manipulation at ".$datetime_now."<br>";
/*input
mis_const_prov,
mis_const_year,
mis_const_month,
mis_const_cdscc
mis_viewevent  <-- when daily run create_mis_viewevent.php
dscc.TempEventAndCaseOfEvent <-- when daily run create_mis_tempdsccformcc.php
*/	
include "create_mis_event_trend.php";
//output = mis_event_trend

/*input
mis_viewevent
dscc.evnrelevntyp
convert_evntyp
dscc.TempEventAndCaseOfEvent <-- when daily run create_mis_tempdsccformcc.php
*/
include "create_mis_event_type.php";
//output = mis_event_type

/*input
mis_const_prov,
mis_const_year,
mis_const_month,
mis_const_cdscc
mis_viewlosofper <-- when daily run create_mis_viewlosofper.php
dscc.TempEventAndCaseOfEvent <-- when daily run create_mis_tempdsccformcc.php
*/
include "create_mis_victim_trend.php";
//output = mis_numvictim_trend

/*
convert_losbody
convert_occ
mis_viewlosofper <-- when daily run create_mis_viewlosofper.php
dscc.TempEventAndCaseOfEvent <-- when daily run create_mis_tempdsccformcc.php
*/
include "create_mis_victim_losbody.php";
//output = mis_numvictim_losbody


//include "append_mis_coverage.php";
$datetime_now= $tempY.date("-m-d-H:i");
echo "<br><br>Finish at ".$datetime_now;
mysql_close($c);
?>
